package com.example.child_protection.dto.request.update;

import com.example.child_protection.dto.base.BaseUpdateRequestDTO;
import com.example.child_protection.enums.BooleanEnums;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * 类目修改请求DTO
 * @date 2018-11-1
 * @author Biz
 */
@Getter
@Setter
public class CategoryUpdateRequestDTO extends BaseUpdateRequestDTO {
    /**
     * 父类目ID
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "父类目ID没有传-1",required = true)
    private Long parentId = -1L;

    /**
     * 类目代码
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "类目代码",required = true)
    private String code;

    /**
     * 类目名称
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "类目名称",required = true)
    private String name;

    /**
     * 状态(是否展示)
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "状态(是否展示)，默认T",required = true)
    private BooleanEnums status = BooleanEnums.T;

    /**
     * 排序
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "排序",required = true)
    private Long sort = 0L;

    /**
     * 描述
     *
     * @mbggenerated
     */
    @ApiParam(value = "描述/备注",required = false)
    private String description;

    public void valid(){

        super.validate( this, new Class[0] );
    }
    public boolean isValidGid() {

        return false;
    }

}
